package com.itheima.collection;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;

public class Demo02 {

    public static void main(String[] args) {
        Collection<String> list= new ArrayList<>();

        list.add("鹿晗");
        list.add("关晓彤");
        list.add("张艺兴");
        list.add("黄子韬");
        list.add("蔡徐坤");
        Iterator<String> iterator = list.iterator();
        while(iterator.hasNext()){
            String next = iterator.next();
            System.out.println(next);
        }


    }
}
